package com.kuanter.kuanterauto.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.kuanter.kuanterauto.R;
import com.kuanter.kuanterauto.baseui.BaseActivity_NoBar;
import com.umeng.analytics.MobclickAgent;

public class XzsfActivity extends BaseActivity_NoBar {

	RelativeLayout rl_hubei = null;// 湖北
	TextView tv_hubei = null;

	RelativeLayout rl_hunan = null;// 湖南
	TextView tv_hunan = null;

	RelativeLayout rl_henan = null;// 河南
	TextView tv_henan = null;

	RelativeLayout rl_jiangxi = null;// 江西
	TextView tv_jiangxi = null;

	RelativeLayout rl_beijing = null;// 北京
	TextView tv_beijing = null;

	RelativeLayout rl_tianjin = null;// 天津
	TextView tv_tianjin = null;

	RelativeLayout rl_hebei = null;// 河北省
	TextView tv_hebei = null;

	RelativeLayout rl_shanxi = null;// 山西省
	TextView tv_shanxi = null;

	RelativeLayout rl_menggu = null;// 蒙古省
	TextView tv_menggu = null;

	RelativeLayout rl_shandong = null;// 山东省
	TextView tv_shandong = null;

	RelativeLayout rl_shanghai = null;// 上海市
	TextView tv_shanghai = null;

	RelativeLayout rl_zhejiang = null;// 浙江省
	TextView tv_zhejiang = null;

	RelativeLayout rl_gansu = null;// 甘肃省
	TextView tv_gansu = null;

	RelativeLayout rl_fujian = null;// 福建省
	TextView tv_fujian = null;

	RelativeLayout rl_anhui = null;// 安徽省"
	TextView tv_anhui = null;

	RelativeLayout rl_jiangsu = null;// 江苏省
	TextView tv_jiangsu = null;

	RelativeLayout rl_chongqing = null;// 重庆市
	TextView tv_chongqing = null;

	RelativeLayout rl_yunnan = null;// 云南省
	TextView tv_yunnan = null;

	RelativeLayout rl_sichuan = null;// 四川省
	TextView tv_sichuan = null;

	RelativeLayout rl_xizang = null;// 西藏省
	TextView tv_xizang = null;

	RelativeLayout rl_guangdong = null;// 广东省
	TextView tv_guangdong = null;

	RelativeLayout rl_guizhou = null;// 贵州省
	TextView tv_guizhou = null;

	RelativeLayout rl_hainan = null;// 海南省
	TextView tv_hainan = null;

	RelativeLayout rl_shan = null;// 陕西省
	TextView tv_shan = null;

	RelativeLayout rl_guangxi = null;// 广西省
	TextView tv_guangxi = null;

	RelativeLayout rl_ningxia = null;// 宁夏省
	TextView tv_ningxia = null;

	RelativeLayout rl_xinjiang = null;// 新疆省
	TextView tv_xinjiang = null;

	RelativeLayout rl_qinghai = null;// 青海省
	TextView tv_qinghai = null;

	RelativeLayout rl_liaoning = null;// 辽宁省
	TextView tv_liaoning = null;

	RelativeLayout rl_jilin = null;// 吉林省
	TextView tv_jilin = null;

	RelativeLayout rl_heilongjiang = null;// 黑龙江
	TextView tv_heilongjiang = null;
	
	private Button btTopLeft_xzsf=null;
	
	
	private String province="";

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		setContentView(R.layout.xzsf);

		initView();
		initListener();
	}

	void initView() {
		btTopLeft_xzsf = (Button) findViewById(R.id.btTopLeft_xzsf);
		
		rl_hubei = (RelativeLayout) findViewById(R.id.rl_hubei);
		rl_hunan = (RelativeLayout) findViewById(R.id.rl_hunan);
		rl_henan = (RelativeLayout) findViewById(R.id.rl_henan);
		rl_jiangxi = (RelativeLayout) findViewById(R.id.rl_jiangxi);
		rl_beijing = (RelativeLayout) findViewById(R.id.rl_beijing);
		rl_tianjin = (RelativeLayout) findViewById(R.id.rl_tianjin);
		rl_hebei = (RelativeLayout) findViewById(R.id.rl_hebei);
		rl_shanxi = (RelativeLayout) findViewById(R.id.rl_shanxi);
		rl_menggu = (RelativeLayout) findViewById(R.id.rl_menggu);
		rl_shandong = (RelativeLayout) findViewById(R.id.rl_shandong);
		rl_shanghai = (RelativeLayout) findViewById(R.id.rl_shanghai);
		rl_zhejiang = (RelativeLayout) findViewById(R.id.rl_zhejiang);
		rl_gansu = (RelativeLayout) findViewById(R.id.rl_gansu);
		rl_fujian = (RelativeLayout) findViewById(R.id.rl_fujian);
		rl_anhui = (RelativeLayout) findViewById(R.id.rl_anhui);
		rl_jiangsu = (RelativeLayout) findViewById(R.id.rl_jiangsu);
		rl_chongqing = (RelativeLayout) findViewById(R.id.rl_chongqing);
		rl_yunnan = (RelativeLayout) findViewById(R.id.rl_yunnan);
		rl_sichuan = (RelativeLayout) findViewById(R.id.rl_sichuan);
		rl_xizang = (RelativeLayout) findViewById(R.id.rl_xizang);
		rl_guangdong = (RelativeLayout) findViewById(R.id.rl_guangdong);
		rl_guizhou = (RelativeLayout) findViewById(R.id.rl_guizhou);
		rl_hainan = (RelativeLayout) findViewById(R.id.rl_hainan);
		rl_shan = (RelativeLayout) findViewById(R.id.rl_shan);
		rl_guangxi = (RelativeLayout) findViewById(R.id.rl_guangxi);
		rl_ningxia = (RelativeLayout) findViewById(R.id.rl_ningxia);
		rl_xinjiang = (RelativeLayout) findViewById(R.id.rl_xinjiang);
		rl_qinghai = (RelativeLayout) findViewById(R.id.rl_qinghai);
		rl_liaoning = (RelativeLayout) findViewById(R.id.rl_liaoning);
		rl_jilin = (RelativeLayout) findViewById(R.id.rl_jilin);
		rl_heilongjiang = (RelativeLayout) findViewById(R.id.rl_heilongjiang);

		tv_hubei = (TextView) findViewById(R.id.tv_hubei);
		tv_hunan = (TextView) findViewById(R.id.tv_hunan);
		tv_henan = (TextView) findViewById(R.id.tv_henan);
		tv_jiangxi = (TextView) findViewById(R.id.tv_jiangxi);
		tv_beijing = (TextView) findViewById(R.id.tv_beijing);
		tv_tianjin = (TextView) findViewById(R.id.tv_tianjin);
		tv_hebei = (TextView) findViewById(R.id.tv_hebei);
		tv_shanxi = (TextView) findViewById(R.id.tv_shanxi);
		tv_menggu = (TextView) findViewById(R.id.tv_menggu);
		tv_shandong = (TextView) findViewById(R.id.tv_shandong);
		tv_shanghai = (TextView) findViewById(R.id.tv_shanghai);
		tv_zhejiang = (TextView) findViewById(R.id.tv_zhejiang);
		tv_gansu = (TextView) findViewById(R.id.tv_gansu);
		tv_fujian = (TextView) findViewById(R.id.tv_fujian);
		tv_anhui = (TextView) findViewById(R.id.tv_anhui);
		tv_jiangsu = (TextView) findViewById(R.id.tv_jiangsu);
		tv_chongqing = (TextView) findViewById(R.id.tv_chongqing);
		tv_yunnan = (TextView) findViewById(R.id.tv_yunnan);
		tv_sichuan = (TextView) findViewById(R.id.tv_sichuan);
		tv_xizang = (TextView) findViewById(R.id.tv_xizang);
		tv_guangdong = (TextView) findViewById(R.id.tv_guangdong);
		tv_guizhou = (TextView) findViewById(R.id.tv_guizhou);
		tv_hainan = (TextView) findViewById(R.id.tv_hainan);
		tv_shan = (TextView) findViewById(R.id.tv_shan);
		tv_guangxi = (TextView) findViewById(R.id.tv_guangxi);
		tv_ningxia = (TextView) findViewById(R.id.tv_ningxia);
		tv_xinjiang = (TextView) findViewById(R.id.tv_xinjiang);
		tv_qinghai = (TextView) findViewById(R.id.tv_qinghai);
		tv_liaoning = (TextView) findViewById(R.id.tv_liaoning);
		tv_jilin = (TextView) findViewById(R.id.tv_jilin);
		tv_heilongjiang = (TextView) findViewById(R.id.tv_heilongjiang);
	}

	void initListener() {
		btTopLeft_xzsf.setOnClickListener(this);
		rl_hubei.setOnClickListener(this);
		rl_hunan.setOnClickListener(this);
		rl_henan.setOnClickListener(this);
		rl_jiangxi.setOnClickListener(this);
		rl_beijing.setOnClickListener(this);
		rl_tianjin.setOnClickListener(this);
		rl_hebei.setOnClickListener(this);
		rl_shanxi.setOnClickListener(this);
		rl_menggu.setOnClickListener(this);
		rl_shandong.setOnClickListener(this);
		rl_shanghai.setOnClickListener(this);
		rl_zhejiang.setOnClickListener(this);
		rl_gansu.setOnClickListener(this);
		rl_fujian.setOnClickListener(this);
		rl_anhui.setOnClickListener(this);
		rl_jiangsu.setOnClickListener(this);
		rl_chongqing.setOnClickListener(this);
		rl_yunnan.setOnClickListener(this);
		rl_sichuan.setOnClickListener(this);
		rl_xizang.setOnClickListener(this);
		rl_guangdong.setOnClickListener(this);
		rl_guizhou.setOnClickListener(this);
		rl_hainan.setOnClickListener(this);
		rl_shan.setOnClickListener(this);
		rl_guangxi.setOnClickListener(this);
		rl_ningxia.setOnClickListener(this);
		rl_xinjiang.setOnClickListener(this);
		rl_qinghai.setOnClickListener(this);
		rl_liaoning.setOnClickListener(this);
		rl_jilin.setOnClickListener(this);
		rl_heilongjiang.setOnClickListener(this);
	}
	
	@Override
	protected void onResume() {
		MobclickAgent.onResume(this);
		super.onResume();
	}
	
	@Override
	protected void onPause() {
		MobclickAgent.onPause(this);
		super.onPause();
	}

	@Override
	public void onClick(View v) {
		Intent intent=new Intent();
		switch (v.getId()) {
		case R.id.btTopLeft_xzsf:
			finish();
			break;
		case R.id.rl_hubei:
			province=tv_hubei.getText().toString();
			intent.putExtra("province", province);
			setResult(TjclActivity.XZSF, intent);
			finish();
			break;
		case R.id.rl_hunan:
			province=tv_hunan.getText().toString();
			intent.putExtra("province", province);
			setResult(TjclActivity.XZSF, intent);
			finish();
			break;
		case R.id.rl_henan:
			province=tv_henan.getText().toString();
			intent.putExtra("province", province);
			setResult(TjclActivity.XZSF, intent);
			finish();
			break;
		case R.id.rl_jiangxi:
			province=tv_jiangxi.getText().toString();
			intent.putExtra("province", province);
			setResult(TjclActivity.XZSF, intent);
			finish();
			break;
		case R.id.rl_beijing:
			province=tv_beijing.getText().toString();
			intent.putExtra("province", province);
			setResult(TjclActivity.XZSF, intent);
			finish();
			break;
		case R.id.rl_tianjin:
			province=tv_tianjin.getText().toString();
			intent.putExtra("province", province);
			setResult(TjclActivity.XZSF, intent);
			finish();
			break;
		case R.id.rl_hebei:
			province=tv_hebei.getText().toString();
			intent.putExtra("province", province);
			setResult(TjclActivity.XZSF, intent);
			finish();
			break;
		case R.id.rl_shanxi:
			province=tv_shanxi.getText().toString();
			intent.putExtra("province", province);
			setResult(TjclActivity.XZSF, intent);
			finish();
			break;
		case R.id.rl_menggu:
			province=tv_menggu.getText().toString();
			intent.putExtra("province", province);
			setResult(TjclActivity.XZSF, intent);
			finish();
			break;
		case R.id.rl_shandong:
			province=tv_shandong.getText().toString();
			intent.putExtra("province", province);
			setResult(TjclActivity.XZSF, intent);
			finish();
			break;
		case R.id.rl_shanghai:
			province=tv_shanghai.getText().toString();
			intent.putExtra("province", province);
			setResult(TjclActivity.XZSF, intent);
			finish();
			break;
		case R.id.rl_zhejiang:
			province=tv_zhejiang.getText().toString();
			intent.putExtra("province", province);
			setResult(TjclActivity.XZSF, intent);
			finish();
			break;
		case R.id.rl_gansu:
			province=tv_gansu.getText().toString();
			intent.putExtra("province", province);
			setResult(TjclActivity.XZSF, intent);
			finish();
			break;
		case R.id.rl_fujian:
			province=tv_fujian.getText().toString();
			intent.putExtra("province", province);
			setResult(TjclActivity.XZSF, intent);
			finish();
			break;
		case R.id.rl_anhui:
			province=tv_anhui.getText().toString();
			intent.putExtra("province", province);
			setResult(TjclActivity.XZSF, intent);
			finish();
			break;
		case R.id.rl_jiangsu:
			province=tv_jiangsu.getText().toString();
			intent.putExtra("province", province);
			setResult(TjclActivity.XZSF, intent);
			finish();
			break;
		case R.id.rl_chongqing:
			province=tv_chongqing.getText().toString();
			intent.putExtra("province", province);
			setResult(TjclActivity.XZSF, intent);
			finish();
			break;
		case R.id.rl_yunnan:
			province=tv_yunnan.getText().toString();
			intent.putExtra("province", province);
			setResult(TjclActivity.XZSF, intent);
			finish();
			break;
		case R.id.rl_sichuan:
			province=tv_sichuan.getText().toString();
			intent.putExtra("province", province);
			setResult(TjclActivity.XZSF, intent);
			finish();
			break;
		case R.id.rl_xizang:
			province=tv_xizang.getText().toString();
			intent.putExtra("province", province);
			setResult(TjclActivity.XZSF, intent);
			finish();
			break;
		case R.id.rl_guangdong:
			province=tv_guangdong.getText().toString();
			intent.putExtra("province", province);
			setResult(TjclActivity.XZSF, intent);
			finish();
			break;
		case R.id.rl_guizhou:
			province=tv_guizhou.getText().toString();
			intent.putExtra("province", province);
			setResult(TjclActivity.XZSF, intent);
			finish();
			break;
		case R.id.rl_hainan:
			province=tv_hainan.getText().toString();
			intent.putExtra("province", province);
			setResult(TjclActivity.XZSF, intent);
			finish();
			break;
		case R.id.rl_shan:
			province=tv_shan.getText().toString();
			intent.putExtra("province", province);
			setResult(TjclActivity.XZSF, intent);
			finish();
			break;
		case R.id.rl_guangxi:
			province=tv_guangxi.getText().toString();
			intent.putExtra("province", province);
			setResult(TjclActivity.XZSF, intent);
			finish();
			break;
		case R.id.rl_ningxia:
			province=tv_ningxia.getText().toString();
			intent.putExtra("province", province);
			setResult(TjclActivity.XZSF, intent);
			finish();
			break;
		case R.id.rl_xinjiang:
			province=tv_xinjiang.getText().toString();
			intent.putExtra("province", province);
			setResult(TjclActivity.XZSF, intent);
			finish();
			break;
		case R.id.rl_qinghai:
			province=tv_qinghai.getText().toString();
			intent.putExtra("province", province);
			setResult(TjclActivity.XZSF, intent);
			finish();
			break;
		case R.id.rl_liaoning:
			province=tv_liaoning.getText().toString();
			intent.putExtra("province", province);
			setResult(TjclActivity.XZSF, intent);
			finish();
			break;
		case R.id.rl_jilin:
			province=tv_jilin.getText().toString();
			intent.putExtra("province", province);
			setResult(TjclActivity.XZSF, intent);
			finish();
			break;
		case R.id.rl_heilongjiang:
			province=tv_heilongjiang.getText().toString();
			intent.putExtra("province", province);
			setResult(TjclActivity.XZSF, intent);
			finish();
			break;
		}

	}

}
